/*
 * Copyright (C) 2019 fastjrun, Inc. All Rights Reserved.
 */
package com.fastjrun.snowy.service.common;


import cn.hutool.core.util.StrUtil;
import com.fastjrun.snowy.common.BaseException;
import com.fastjrun.snowy.common.CodeMsgI;

public class ServiceException extends BaseException {

    private static final long serialVersionUID = 1511421458976623065L;

    public ServiceException(Integer code, String msg, Object... arguments) {
        super(code, StrUtil.format(msg, arguments));
    }


    public ServiceException(CodeMsgI codeMsgI, Object... arguments) {
        super(codeMsgI.getCode(), StrUtil.format(codeMsgI.getMsg(), arguments));
    }
}
